//
//  BaoxiuPorpertyView.swift
//  Xiaozihui
//
//  Created by 校企荟 on 2017/10/18.
//  Copyright © 2017年 校企荟. All rights reserved.
//

import UIKit

class BaoxiuPorpertyView: UIView {

    lazy var icon: UIImageView = {
        let iv = UIImageView(image: UIImage(named: ""))
        return iv
    }()
    
    lazy var addressLbl: UILabel = {
        let lbl = UILabel(content: "", textFont: UIFont.boldSystemFont(ofSize: 15 * ScaleX), color: #colorLiteral(red: 0.2, green: 0.2, blue: 0.2, alpha: 1), alignment: .left, numberOfLine: 0)
        let style = NSMutableParagraphStyle()
        style.lineSpacing = 5
        lbl.attributedText = NSAttributedString(string: "上海市闵行区新源路\r\n上海市闵行区新源路", attributes: [NSParagraphStyleAttributeName : style])
        return lbl
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        
        addSubview(icon)
        addSubview(addressLbl)
        
        icon.snp.makeConstraints { (make) in
            make.left.equalTo(self).offset(20)
            make.top.equalTo(self).offset(10)
        }
        
        addressLbl.snp.makeConstraints { (make) in
            make.centerY.equalTo(self)
            make.left.equalTo(icon.snp.right).offset(10)
            make.top.equalTo(self).offset(15)
            make.bottom.equalTo(self).offset(-15)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
